//
// Created by Administrator on 2025/4/13/周日.
//
#include "iostream"

using namespace std;


//创建fuc函数
int *func() {
    int *a = new int(10);
    return a;
}

int main() {
    int *p = func();
    cout << *p << endl;
    cout << *p << endl;

//    利用delete释放空间
    delete p;
//    已经删除后无法再输出原来的值

//    cout << *p << endl;

    return 0;
}